package com.example.login.repository;

import com.example.login.entity.Collect;
import org.springframework.data.jpa.repository.JpaRepository;

import javax.transaction.Transactional;
import java.math.BigInteger;
import java.util.List;

public interface CollectRepository extends JpaRepository<Collect,Integer> {
    Collect findByUseridAndPoemid(Integer userid, BigInteger poemid);
    List<Collect> findByUserid(Integer userid);
    @Transactional
    void deleteByUseridAndPoemid(Integer userid, BigInteger poemid);

}
